package com.primeton.wh.mcenter.api.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author: YunTao.Li
 * @create: 2020-03-19 16:49
 * @description:
 **/

@TableName("sys_application")
@Data
public class Application extends Model<Message> {
        //原先是ASSIGN_ID
    @TableId(type = IdType.ASSIGN_ID, value = "APP_ID")
    private String appId;

    @TableField("APP_CODE")
    private String appCode;

    @TableField("APP_NAME")
    private String appName;

    @TableField("APP_SORT")
    private Integer appSort;

    @TableField("APP_ICON")
    private String appIcon;

    @TableField("APP_STATUS")
    private Integer appStatus;

    @TableField("APP_DESC")
    private String appDesc;

    @TableField(exist = false)
    private String nearestMsgTitle;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //Jackson包使用注解
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //格式化前台日期参数注解
    @TableField(exist = false)
    private Date nearestMsgDate;

    @TableField(exist = false)
    private int unreadMsgCount;

}
